package com.ssm.subject.infra.basic.service.impl;

import com.ssm.subject.infra.basic.entity.SubjectLiked;
import com.ssm.subject.infra.basic.mapper.SubjectLikedDao;
import com.ssm.subject.infra.basic.service.SubjectLikedService;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;
import java.util.List;

/**
 * (SubjectLiked)表服务实现类
 *
 * @author makejava
 * @since 2025-01-22 19:55:42
 */
@Service("subjectLikedService")
public class SubjectLikedServiceImpl implements SubjectLikedService {
    @Resource
    private SubjectLikedDao subjectLikedDao;

    /**
     * 批量新增
     * @param subjectLikedList
     * @return
     */
    @Override
    public int batchInsertOrUpdate(List<SubjectLiked> subjectLikedList) {
        return this.subjectLikedDao.batchInsertOrUpdate(subjectLikedList);
    }

    /**
     * 查询满足条件的数量
     * @param subjectLiked
     * @return
     */
    @Override
    public int countByCondition(SubjectLiked subjectLiked) {
        return this.subjectLikedDao.countByCondition(subjectLiked);
    }

    /**
     * 分页查询
     * @param subjectLiked
     * @param start
     * @param pageSize
     * @return
     */
    @Override
    public List<SubjectLiked> queryPage(SubjectLiked subjectLiked, int start, Integer pageSize) {
        return this.subjectLikedDao.queryPage(subjectLiked, start, pageSize);
    }
}
